//
//  HFUIView+Extension.swift
//  sinaMicroBlog
//
//  Created by mac on 15/11/19.
//  Copyright © 2015年 mac. All rights reserved.
//

import UIKit

extension UIView {
    func navController() -> UINavigationController? {
        var next = self.nextResponder()
        repeat {
            if next is UINavigationController {
                return next as? UINavigationController
            }
            next = next?.nextResponder()
        }while(next != nil)
        return nil
    }
}